#!/usr/bin/env python3
import sys
from gi.repository import Gio

# 初始化GSettings
settings = Gio.Settings.new("fit")

def is_deepin():
    try:
            from gi.repository import Dtk
                    return True
                        except ImportError:
                                return False

                                def main():
                                    if is_deepin():
                                            from dtk_ui import DeepinWindow
                                                    window = DeepinWindow(settings)
                                                        else:
                                                                from gtk_ui import GTKWindow
                                                                        window = GTKWindow(settings)
                                                                            
                                                                                window.connect("destroy", Gtk.main_quit)
                                                                                    window.show_all()
                                                                                        Gtk.main()

                                                                                        if __name__ == "__main__":
                                                                                            main()